#include "dispatcher.h"

/**
 * @brief 接收帧并处理请求
*/
int dispatcher(int net_fd, unsigned int *frameLength, unsigned short *command, char *parameter){
    // 接收帧
    int ret;  
    ret = recv(net_fd, frameLength, sizeof(unsigned int), MSG_WAITALL);

    ret = recv(net_fd, command, sizeof(unsigned short), MSG_WAITALL);

    ret = recv(net_fd, parameter, *frameLength, MSG_WAITALL);
    return ret;
}
